package com.blue.http.controller;

import com.blue.http.annotation.Websocket;
import com.blue.http.message.WebsocketRequest;
import com.blue.http.message.WebsocketResponse;
import com.blue.http.util.WebsocketUtil;
import org.springframework.stereotype.Controller;

@Controller
@Websocket(url="/echo")
public class WebsocketEchoController
{
	public WebsocketEchoController()
	{
	}
	
	public WebsocketResponse echo(WebsocketRequest request)
	{
		WebsocketResponse response = WebsocketUtil.createResponse(request, WebsocketResponse.class);
		response.setResult("成功Websocket连接");
		return response;
	}
	
	
}
